Remove an unneeded variable
authorMatthias Clasen <mclasen@redhat.com>
Fri, 23 Dec 2011 00:38:59 +0000 (00:38 +0000)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 23 Dec 2011 05:36:20 +0000 (00:36 -0500)
gtk/gtkmenu.c

index 2ab683bbf8ef2801c9a2d402d94cf3d95183c036..2d29caaf25c0b3f099d1036d76903faa15a44d96 100644 (file)
@@ -4613,7 +4613,6 @@ gtk_menu_position (GtkMenu  *menu,
   GtkRequisition requisition;
   gint x, y;
   gint scroll_offset;
-  gint menu_height;
   GdkScreen *screen;
   GdkScreen *pointer_screen;
   GdkRectangle monitor;
@@ -4786,12 +4785,10 @@ gtk_menu_position (GtkMenu  *menu,
 
   if (priv->initially_pushed_in)
     {
-      menu_height = requisition.height;
-
-      if (y + menu_height > monitor.y + monitor.height)
+      if (y + requisition.height > monitor.y + monitor.height)
         {
-          scroll_offset -= y + menu_height - (monitor.y + monitor.height);
-          y = (monitor.y + monitor.height) - menu_height;
+          scroll_offset -= y + requisition.height - (monitor.y + monitor.height);
+          y = (monitor.y + monitor.height) - requisition.height;
         }
 
       if (y < monitor.y)